home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / MATHS / RLAB / RLAB125.ZIP / !RLaB / help_ai / BREAK < prev    next >
Text File  |  1994-06-20  |  469b  |  30 lines

  1. BREAK:
  2.  
  3.     The break statement functions similar to the C break. The
  4.     break statement provides an early exit from the enclosing for,
  5.     or while loop. For example:
  6.  
  7.     > while ( i < 100 ) {
  8.     >   if(i == 10) { break; }
  9.     >   i++;
  10.     > }
  11.     > i
  12.      i =
  13.               10
  14.     //
  15.     // OR
  16.     //
  17.  
  18.     > i=0;j=0;
  19.     > while (i < 5) 
  20.         > { 
  21.         >   while (j < 5) { if (j == 3) { break } j++; }
  22.         >   i++; 
  23.         > } i j 
  24.      i =
  25.             5
  26.      j =
  27.             3
  28.  
  29. See Also: CONTINUE, FOR, WHILE
  30.